Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove processed attestation log #4040

Merged
merged 3 commits into from
May 25, 2022

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented May 20, 2022

Motivation

Remove the "Attestation processed" log, this log account for roughly 80% of log file

Description

Replace #4032

@twoeths twoeths requested a review from a team as a code owner May 20, 2022 01:16
@github-actions
Copy link
Contributor

github-actions bot commented May 20, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b9521ad Previous: 11f6d0e Ratio
BeaconState.hashTreeRoot - No change 552.00 ns/op 551.00 ns/op 1.00
BeaconState.hashTreeRoot - 1 full validator 76.338 us/op 70.882 us/op 1.08
BeaconState.hashTreeRoot - 32 full validator 788.59 us/op 679.15 us/op 1.16
BeaconState.hashTreeRoot - 512 full validator 8.4645 ms/op 7.1044 ms/op 1.19
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 103.42 us/op 88.681 us/op 1.17
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3845 ms/op 1.3153 ms/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.089 ms/op 17.934 ms/op 1.06
BeaconState.hashTreeRoot - 1 balances 75.494 us/op 69.741 us/op 1.08
BeaconState.hashTreeRoot - 32 balances 668.24 us/op 588.21 us/op 1.14
BeaconState.hashTreeRoot - 512 balances 6.2216 ms/op 5.7929 ms/op 1.07
BeaconState.hashTreeRoot - 250000 balances 139.53 ms/op 125.41 ms/op 1.11
processSlot - 1 slots 16.060 us/op 16.294 us/op 0.99
processSlot - 32 slots 2.2633 ms/op 2.1975 ms/op 1.03
getCommitteeAssignments - req 1 vs - 250000 vc 5.8062 ms/op 5.4447 ms/op 1.07
getCommitteeAssignments - req 100 vs - 250000 vc 8.3663 ms/op 7.9457 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 8.9270 ms/op 8.5496 ms/op 1.04
computeProposers - vc 250000 21.047 ms/op 22.287 ms/op 0.94
computeEpochShuffling - vc 250000 193.57 ms/op 165.54 ms/op 1.17
getNextSyncCommittee - vc 250000 350.93 ms/op 358.95 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 5.5716 ms/op 5.2907 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei worstcase 7.3671 ms/op 6.9655 ms/op 1.06
altair processAttestation - setStatus - 1/6 committees join 231.07 us/op 219.82 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 419.91 us/op 462.35 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 619.88 us/op 597.82 us/op 1.04
altair processAttestation - setStatus - 2/3 committees join 773.54 us/op 776.18 us/op 1.00
altair processAttestation - setStatus - 4/5 committees join 1.1388 ms/op 1.1928 ms/op 0.95
altair processAttestation - setStatus - 100% committees join 1.3867 ms/op 1.3900 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase 35.711 ms/op 30.908 ms/op 1.16
altair processBlock - 250000 vs - 7PWei normalcase hashState 45.355 ms/op 43.279 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 97.941 ms/op 90.151 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase hashState 143.07 ms/op 136.89 ms/op 1.05
altair processEth1Data - 250000 vs - 7PWei normalcase 1.1168 ms/op 1.0997 ms/op 1.02
altair processEpoch - mainnet_e81889 681.08 ms/op 613.67 ms/op 1.11
mainnet_e81889 - altair beforeProcessEpoch 162.46 ms/op 117.46 ms/op 1.38
mainnet_e81889 - altair processJustificationAndFinalization 73.294 us/op 72.362 us/op 1.01
mainnet_e81889 - altair processInactivityUpdates 12.827 ms/op 11.366 ms/op 1.13
mainnet_e81889 - altair processRewardsAndPenalties 101.62 ms/op 170.62 ms/op 0.60
mainnet_e81889 - altair processRegistryUpdates 15.515 us/op 17.377 us/op 0.89
mainnet_e81889 - altair processSlashings 5.2330 us/op 6.7660 us/op 0.77
mainnet_e81889 - altair processEth1DataReset 4.8040 us/op 6.4930 us/op 0.74
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.6148 ms/op 7.5130 ms/op 0.35
mainnet_e81889 - altair processSlashingsReset 20.838 us/op 22.744 us/op 0.92
mainnet_e81889 - altair processRandaoMixesReset 27.661 us/op 25.970 us/op 1.07
mainnet_e81889 - altair processHistoricalRootsUpdate 5.1920 us/op 9.2400 us/op 0.56
mainnet_e81889 - altair processParticipationFlagUpdates 15.033 us/op 14.875 us/op 1.01
mainnet_e81889 - altair processSyncCommitteeUpdates 4.2970 us/op 5.5820 us/op 0.77
mainnet_e81889 - altair afterProcessEpoch 236.53 ms/op 192.92 ms/op 1.23
altair processInactivityUpdates - 250000 normalcase 54.684 ms/op 45.577 ms/op 1.20
altair processInactivityUpdates - 250000 worstcase 41.904 ms/op 37.248 ms/op 1.13
altair processRewardsAndPenalties - 250000 normalcase 100.38 ms/op 91.975 ms/op 1.09
altair processRewardsAndPenalties - 250000 worstcase 94.941 ms/op 140.37 ms/op 0.68
altair processSyncCommitteeUpdates - 250000 366.85 ms/op 356.37 ms/op 1.03
Tree 40 250000 create 1.1408 s/op 919.42 ms/op 1.24
Tree 40 250000 get(125000) 331.01 ns/op 335.51 ns/op 0.99
Tree 40 250000 set(125000) 4.1104 us/op 2.9838 us/op 1.38
Tree 40 250000 toArray() 38.088 ms/op 35.956 ms/op 1.06
Tree 40 250000 iterate all - toArray() + loop 38.118 ms/op 36.298 ms/op 1.05
Tree 40 250000 iterate all - get(i) 142.33 ms/op 133.98 ms/op 1.06
MutableVector 250000 create 20.571 ms/op 17.334 ms/op 1.19
MutableVector 250000 get(125000) 15.277 ns/op 14.001 ns/op 1.09
MutableVector 250000 set(125000) 1.2741 us/op 1.0010 us/op 1.27
MutableVector 250000 toArray() 8.7916 ms/op 7.1902 ms/op 1.22
MutableVector 250000 iterate all - toArray() + loop 7.7076 ms/op 7.9341 ms/op 0.97
MutableVector 250000 iterate all - get(i) 3.6363 ms/op 3.5945 ms/op 1.01
Array 250000 create 7.1754 ms/op 7.5130 ms/op 0.96
Array 250000 clone - spread 3.0685 ms/op 3.9445 ms/op 0.78
Array 250000 get(125000) 1.4410 ns/op 1.8430 ns/op 0.78
Array 250000 set(125000) 1.4720 ns/op 1.7380 ns/op 0.85
Array 250000 iterate all - loop 147.22 us/op 150.17 us/op 0.98
effectiveBalanceIncrements clone Uint8Array 300000 110.37 us/op 124.71 us/op 0.89
effectiveBalanceIncrements clone MutableVector 300000 975.00 ns/op 1.3570 us/op 0.72
effectiveBalanceIncrements rw all Uint8Array 300000 341.28 us/op 208.91 us/op 1.63
effectiveBalanceIncrements rw all MutableVector 300000 269.00 ms/op 304.68 ms/op 0.88
aggregationBits - 2048 els - zipIndexesInBitList 35.741 us/op 43.416 us/op 0.82
regular array get 100000 times 58.901 us/op 59.810 us/op 0.98
wrappedArray get 100000 times 58.778 us/op 60.217 us/op 0.98
arrayWithProxy get 100000 times 35.889 ms/op 36.982 ms/op 0.97
ssz.Root.equals 591.00 ns/op 604.00 ns/op 0.98
byteArrayEquals 591.00 ns/op 585.00 ns/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 4.5666 ms/op 4.9823 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei worstcase 65.920 ms/op 59.214 ms/op 1.11
phase0 afterProcessEpoch - 250000 vs - 7PWei 214.23 ms/op 209.19 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 82.114 ms/op 81.332 ms/op 1.01
phase0 processEpoch - mainnet_e58758 659.73 ms/op 627.72 ms/op 1.05
mainnet_e58758 - phase0 beforeProcessEpoch 309.60 ms/op 286.07 ms/op 1.08
mainnet_e58758 - phase0 processJustificationAndFinalization 72.111 us/op 67.534 us/op 1.07
mainnet_e58758 - phase0 processRewardsAndPenalties 151.98 ms/op 93.939 ms/op 1.62
mainnet_e58758 - phase0 processRegistryUpdates 38.622 us/op 32.940 us/op 1.17
mainnet_e58758 - phase0 processSlashings 5.0610 us/op 5.7620 us/op 0.88
mainnet_e58758 - phase0 processEth1DataReset 4.5490 us/op 5.1400 us/op 0.89
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 3.3219 ms/op 6.2512 ms/op 0.53
mainnet_e58758 - phase0 processSlashingsReset 23.188 us/op 20.496 us/op 1.13
mainnet_e58758 - phase0 processRandaoMixesReset 26.726 us/op 24.380 us/op 1.10
mainnet_e58758 - phase0 processHistoricalRootsUpdate 5.9060 us/op 7.0200 us/op 0.84
mainnet_e58758 - phase0 processParticipationRecordUpdates 28.809 us/op 23.664 us/op 1.22
mainnet_e58758 - phase0 afterProcessEpoch 186.72 ms/op 164.75 ms/op 1.13
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4758 ms/op 7.2759 ms/op 0.34
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.7124 ms/op 7.8117 ms/op 0.35
phase0 processRegistryUpdates - 250000 normalcase 30.528 us/op 28.769 us/op 1.06
phase0 processRegistryUpdates - 250000 badcase_full_deposits 529.46 us/op 499.07 us/op 1.06
phase0 processRegistryUpdates - 250000 worstcase 0.5 266.73 ms/op 232.39 ms/op 1.15
phase0 getAttestationDeltas - 250000 normalcase 18.959 ms/op 17.128 ms/op 1.11
phase0 getAttestationDeltas - 250000 worstcase 18.901 ms/op 18.112 ms/op 1.04
phase0 processSlashings - 250000 worstcase 8.0539 ms/op 7.2653 ms/op 1.11
shuffle list - 16384 els 12.979 ms/op 10.966 ms/op 1.18
shuffle list - 250000 els 189.46 ms/op 156.77 ms/op 1.21
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 519.84 us/op 530.64 us/op 0.98
pass gossip attestations to forkchoice per slot 3.8518 ms/op 3.9081 ms/op 0.99
computeDeltas 4.1782 ms/op 3.9256 ms/op 1.06
computeProposerBoostScoreFromBalances 913.40 us/op 503.60 us/op 1.81
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.6630 ms/op 2.6397 ms/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 94.260 us/op 88.862 us/op 1.06
BLS verify - blst-native 2.7390 ms/op 2.2365 ms/op 1.22
BLS verifyMultipleSignatures 3 - blst-native 5.7425 ms/op 4.5702 ms/op 1.26
BLS verifyMultipleSignatures 8 - blst-native 12.288 ms/op 10.147 ms/op 1.21
BLS verifyMultipleSignatures 32 - blst-native 44.834 ms/op 35.925 ms/op 1.25
BLS aggregatePubkeys 32 - blst-native 61.248 us/op 48.601 us/op 1.26
BLS aggregatePubkeys 128 - blst-native 236.16 us/op 190.30 us/op 1.24
getAttestationsForBlock 68.338 ms/op 74.752 ms/op 0.91
isKnown best case - 1 super set check 574.00 ns/op 527.00 ns/op 1.09
isKnown normal case - 2 super set checks 544.00 ns/op 478.00 ns/op 1.14
isKnown worse case - 16 super set checks 566.00 ns/op 495.00 ns/op 1.14
CheckpointStateCache - add get delete 14.733 us/op 15.289 us/op 0.96
validate gossip signedAggregateAndProof - struct 6.4478 ms/op 5.3919 ms/op 1.20
validate gossip attestation - struct 2.9968 ms/op 2.4086 ms/op 1.24
altair verifyImport mainnet_s3766816:31 9.7174 s/op 8.5380 s/op 1.14
pickEth1Vote - no votes 2.6214 ms/op 2.5001 ms/op 1.05
pickEth1Vote - max votes 31.479 ms/op 32.613 ms/op 0.97
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.201 ms/op 14.755 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 30.610 ms/op 26.923 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize value x2048 1.9059 ms/op 2.0619 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 21.526 ms/op 22.268 ms/op 0.97
bytes32 toHexString 1.4340 us/op 1.4770 us/op 0.97
bytes32 Buffer.toString(hex) 907.00 ns/op 817.00 ns/op 1.11
bytes32 Buffer.toString(hex) from Uint8Array 1.1810 us/op 1.1640 us/op 1.01
bytes32 Buffer.toString(hex) + 0x 874.00 ns/op 888.00 ns/op 0.98
Object access 1 prop 0.50100 ns/op 0.48500 ns/op 1.03
Map access 1 prop 0.34300 ns/op 0.35700 ns/op 0.96
Object get x1000 16.640 ns/op 16.664 ns/op 1.00
Map get x1000 0.98300 ns/op 0.95100 ns/op 1.03
Object set x1000 131.79 ns/op 126.25 ns/op 1.04
Map set x1000 91.136 ns/op 86.675 ns/op 1.05
Return object 10000 times 0.43960 ns/op 0.39950 ns/op 1.10
Throw Error 10000 times 7.4109 us/op 6.8844 us/op 1.08
enrSubnets - fastDeserialize 64 bits 3.6670 us/op 3.4630 us/op 1.06
enrSubnets - ssz BitVector 64 bits 1.0130 us/op 952.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 516.00 ns/op 507.00 ns/op 1.02
enrSubnets - ssz BitVector 4 bits 1.0090 us/op 922.00 ns/op 1.09
prioritizePeers score -10:0 att 32-0.1 sync 2-0 128.67 us/op 124.95 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 161.66 us/op 157.78 us/op 1.02
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 306.40 us/op 290.98 us/op 1.05
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 611.81 us/op 668.93 us/op 0.91
prioritizePeers score 0:0 att 64-1 sync 4-1 628.34 us/op 554.05 us/op 1.13
RateTracker 1000000 limit, 1 obj count per request 237.02 ns/op 211.11 ns/op 1.12
RateTracker 1000000 limit, 2 obj count per request 175.49 ns/op 162.35 ns/op 1.08
RateTracker 1000000 limit, 4 obj count per request 146.34 ns/op 132.11 ns/op 1.11
RateTracker 1000000 limit, 8 obj count per request 136.15 ns/op 129.77 ns/op 1.05
RateTracker with prune 6.7820 us/op 6.0040 us/op 1.13
array of 16000 items push then shift 5.5007 us/op 5.6422 us/op 0.97
LinkedList of 16000 items push then shift 29.843 ns/op 30.558 ns/op 0.98
array of 16000 items push then pop 291.87 ns/op 268.12 ns/op 1.09
LinkedList of 16000 items push then pop 24.836 ns/op 25.546 ns/op 0.97
array of 24000 items push then shift 8.2414 us/op 8.2176 us/op 1.00
LinkedList of 24000 items push then shift 30.471 ns/op 30.997 ns/op 0.98
array of 24000 items push then pop 260.52 ns/op 261.07 ns/op 1.00
LinkedList of 24000 items push then pop 23.911 ns/op 26.667 ns/op 0.90
intersect bitArray bitLen 8 12.949 ns/op 9.9510 ns/op 1.30
intersect array and set length 8 218.10 ns/op 229.50 ns/op 0.95
intersect bitArray bitLen 128 76.828 ns/op 60.421 ns/op 1.27
intersect array and set length 128 2.5011 us/op 2.5066 us/op 1.00

by benchmarkbot/action

@codecov
Copy link

codecov bot commented May 20, 2022

Codecov Report

Merging #4040 (2c1bc7c) into master (dd0e4dd) will increase coverage by 36.72%.
The diff coverage is n/a.

❗ Current head 2c1bc7c differs from pull request most recent head cee78a1. Consider uploading reports for the commit cee78a1 to get more accurate results

@@             Coverage Diff             @@
##           master    #4040       +/-   ##
===========================================
+ Coverage        0   36.72%   +36.72%     
===========================================
  Files           0      326      +326     
  Lines           0     9242     +9242     
  Branches        0     1505     +1505     
===========================================
+ Hits            0     3394     +3394     
- Misses          0     5657     +5657     
- Partials        0      191      +191     

aggregationBits: ssz.phase0.CommitteeBits.toJson(attestation.aggregationBits) as string,
});
export function onAttestation(this: BeaconChain, _: phase0.Attestation): void {
// do nothing for now
Copy link
Member

@wemeetagain wemeetagain May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a more descriptive comment sharing why we aren't logging here? Maybe linking to #4032 or adding some of the reasoning from that

@twoeths twoeths force-pushed the tuyen/remove-processed-attestation-log branch from 2c1bc7c to cee78a1 Compare May 25, 2022 02:02
@twoeths twoeths requested a review from wemeetagain May 25, 2022 03:14
@wemeetagain wemeetagain merged commit 3db3bf6 into master May 25, 2022
@wemeetagain wemeetagain deleted the tuyen/remove-processed-attestation-log branch May 25, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants